<template>
  <div>这是子组件</div>
  <button @click="increment">{{ count }}</button>
</template>

<script setup>
import { ref } from "vue";

const count = ref(0);

function increment() {
  count.value++;
}
defineExpose({
  count,
  increment,
});
</script>

<style scoped></style>
